<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

    </style>
</head>
<body>

</body>
<script>
    // 数组：从左往右依次对应，不存在的位置undefined
    const arr=["hello",1,2,3,4,"wrold"]

    const [a,b,c,d,e,f,g,h,i]=arr;
    console.log(a);
    console.log(b);
    console.log(c);
    console.log(d);
    console.log(e);
    console.log(f);
    console.log(g);
    console.log(h);
    console.log(i);

    // 交换两个变量的值
    let aaa=10;
    let ccc=20;
    [aaa,ccc]=[ccc,aaa];
    console.log(aaa);
    console.log(ccc);
</script>
</html>